package pbc.gx.ekp.addressbook.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(value = 1)
public class deptStartService implements ApplicationRunner {

    private final DeptService deptService;

    public deptStartService(DeptService deptService) {
        this.deptService = deptService;
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        deptService.updateDeptOrder();

    }
}